<?php

class StringHelper {

	/**
	 * Generate a random String
	 * @param $length
	 * @param $letters
	 * @return unknown_type
	 */
	function generateRandomString($length = 10, $letters = '1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM')
	{
		$s = '';
		$lettersLength = strlen($letters)-1;
			
		for($i = 0 ; $i < $length ; $i++)
		{
			$s .= $letters[rand(0,$lettersLength)];
		}
			
		return $s;
	}
}